<?php
namespace app\home\controller;

use think\Controller;
use app\home\model\GoodsType;
use think\facade\Session;

class Index extends Controller
{   
    protected $middleware = [
        'Check'=> ['except' 	=> ['index'] ],
    ];

    public function index()
    {       
        //首页取出所有分类
        $type = GoodsType::select();

        
        return $this->fetch('index',['type'=>$type]);
    }

    public function hello($name = 'ThinkPHP5')
    {
        return 'hello,' . $name;
    }
}
